#!/usr/local/bin/perl -w
use strict;
use utf8;
use lib '../lib';

use NG::Gen::App qw(
NG::Gen::AuthCgi
);

my $app = new NG::Sys::App();

$app->run;

sub cmd_default {
	my ($app,$form,$obj) = @_;
	if($form->{user}){
		$form->{user}->check_online;
		$form->{data}{text} = "ok";
	}else{
		$form->set_error(401 => "need autorisation");
	}
	$form->process_as_json;
}
